# global
# nonlocal


a = 1  # 模块第一层


# def f1():
#     global a  # 模块内第一层
#     a += 1
#     print(a)
#
# f1()

def f2():
    a = 2
    def f3():
        a = 3
        def f4():

            a=9
            # a = 1
            print(a + 1)
            # a += 1   #   a = a + 1
            # print(a)

        f4()

    f3()

f2()


# a = a+1  =>   a=1+1  =>   a=2  =>   a ->  0x1234